package com.ruike.alisurface.services;

import android.app.smdt.SmdtManager;

import com.ruike.alisurface.MyApplication;
import com.ruike.alisurface.Serials.Ttys1Utils;

/**
 * @author: tjf
 * @date: 2023-04-03
 * @desc：
 */
public class ZtlManager {
    SmdtManager smdt;

    public ZtlManager() {
        smdt = SmdtManager.create(MyApplication.getAppContext());
    }

    private static ZtlManager ztlManager;

    public static ZtlManager getInstance() {
        if (ztlManager == null) {
            synchronized (Ttys1Utils.class) {
                if (ztlManager == null) {
                    ztlManager = new ZtlManager();
                }
            }
        }
        return ztlManager;
    }

    public int smdtReadExtrnalGpioValue(int gpioNumber) {
        return smdt.smdtReadExtrnalGpioValue(gpioNumber);
    }


}
